package com.moss.cloud.job.execute.processor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import tech.powerjob.official.processors.util.CommonUtils;
import tech.powerjob.worker.core.processor.ProcessResult;
import tech.powerjob.worker.core.processor.TaskContext;
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;

@Slf4j
@Component
public class TestProcessorDemo implements BasicProcessor {
    @Override
    public ProcessResult process(TaskContext context){
        log.info("开始执行任务：{}",context.getUserContext());
        final String parseParams = CommonUtils.parseParams(context);
        log.info("参数:{}",parseParams);
        return new ProcessResult(true);
    }
}
